package com.ali.resource.ShareTools;

import com.aliyun.teautil.models.RuntimeOptions;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class TeaopenapiClient {

    @Value("${ali.ak}")
    private String ak;

    @Value("${ali.sk}")
    private String sk;

    public com.aliyun.teaopenapi.models.Config getClient() throws Exception {
        com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config()
                // 必填，您的 AccessKey ID
                .setAccessKeyId(ak)
                // 必填，您的 AccessKey Secret
                .setAccessKeySecret(sk);
        return config;
    }

    public com.aliyun.teautil.models.RuntimeOptions getRunTime(){
        RuntimeOptions runtimeOptions = new RuntimeOptions();
        return runtimeOptions;
    }

}
